<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var obj2 = {
            name:'电脑',
            prise:999,
            num:10
        }
        var arr = Object.keys(obj2)     //属性名
        var arr1 = Object.values(obj2)  //属性值
        console.log(arr)
        console.log(arr1)

        Object.defineProperty(obj2,'fn',{
            value:'优良',
            configurable:true,
            writable:true,
            enumerable:true
        })
        console.log(obj2)
        var obj = {
            name : 'he'
        }
        var obj1 = {
            age : 18
        }
        Object.assign(obj,obj1)
        console.log(obj)

    </script>
</body>
</html>